
var util = require('../../utils/util.js')
var wxRequest = require('../../utils/wxRequest.js')
Page({
  data: {
    PageCur: 'basics',
    PageName: '聊天表情包',
    shareImg:'https://static.ath365.com/Fn5EM_IJ6CTDtdrZ7e6O_YCnXxQr'
  },
  onLoad: function (options) {
    wx.setNavigationBarTitle({
      title: this.data.PageName
    });
    var that = this;
    var data = {
      configKey:'miniapp.shareImage'
    };
    var req = util.configSet(data);
    req.then(function(json){
      console.log(json.data.result);
      that.setData({
        shareImg:json.data.result,
        PageName:json.data.name,
      });
    })
  },
  NavChange(e) {
    this.setData({
      PageCur: e.currentTarget.dataset.cur,
      PageName: e.currentTarget.dataset.name
    });

    wx.setNavigationBarTitle({
      title: this.data.PageName
    });
  },
  onShareAppMessage() {
    return {
      title: this.data.PageName,
      imageUrl: this.data.shareImg,
      path: '/pages/index/index'
    }
  },
  onShareTimeline() {
    return {
      title: this.data.PageName,
      imageUrl: this.data.shareImg,
      query: '/pages/index/index'
    }
  },
  onPullDownRefresh(){
    
  }
})